package com.qiu.greened.controller;


import com.qiu.greened.pojo.Follow;
import com.qiu.greened.pojo.vo.ResultVo;
import com.qiu.greened.service.IFollowService;
import com.qiu.greened.utils.ResultGenerator;
import io.swagger.annotations.Api;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 关注表 前端控制器
 * </p>
 *
 * @author qiu
 * @since 2021-12-09
 */
@RestController
@Api(tags = "关注")
@RequestMapping("/user")
@AllArgsConstructor
public class FollowController {

    IFollowService followService;

    @PostMapping("/follow")
    public ResultVo<Object> addOrDeletePostStar(@RequestBody Follow follow) {
        String msg = followService.addOrDeletePostFollow(follow);
        return ResultGenerator.success(msg);
    }
}

